Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(framework): add class-validator support #6840

Open
wants to merge 3 commits into
base: next
Choose a base branch
from

Conversation

paulwer
Copy link
Contributor

@paulwer paulwer commented Nov 4, 2024

What changed? Why was the change needed?

Class Validator support for @novu/framework

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

I was not able to resolve the preexisting type errors present at client.validation.test.ts. Those may have to be fixed and tested before merging.
Please also check the step.types.ts change in details.

closes #6682

Copy link

netlify bot commented Nov 4, 2024

👷 Deploy request for novu-stg-vite-dashboard-poc pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit a16f147

@paulwer paulwer changed the title feat: add class-validator support feat(framework): add class-validator support Nov 4, 2024
@paulwer
Copy link
Contributor Author

paulwer commented Nov 6, 2024

@rifont i marked you to may review this PR, as you have created the original validator implementation.
If there is anything I can provide, please reach out :)

@SokratisVidros
Copy link
Contributor

SokratisVidros commented Nov 6, 2024

@paulwer Thanks for submitting this PR. It coincides with an internal conversation about allowing contributors to bring their own validations, such as Zod, ClassValidator, etc...

Our dynamic require("x") pattern, along with peer dependencies, served us well so far, but as we moved our package to its ESM/CJS state, we noticed it caused some issues in some bundlers, such as Turbopack beta.

We expect to conclude our strategy by the end of this week, and the decision might also affect this PR. We would love to hear your opinions or suggestions on the matter.

@paulwer
Copy link
Contributor Author

paulwer commented Nov 6, 2024

Hi @SokratisVidros, thanks for the feedback. If the descision would be to only allow json-schema, i would like to encourage you to provide examples or mapper functions to be installed additionaly.

If I can support this in any way, please let me know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 Feature: @novu/framework Integration with class-validator
2 participants